const fs = require("fs");
const path = require("path");
const contentPath = path.resolve(__dirname, "./data.txt");

/**
 * 判断文件是否存在
 * 建议使用 stat
 */
fs.exists(contentPath, (result) => {
  console.log(result);
});
